#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define ADD1(a,b) a+b
#define ADD2(a,b) (a+b)

/*
结构体测试，宏定义测试
*/

int main1() {
	struct Student
	{
		char name[10];
		unsigned int age;
		float height;
	};

	struct Student stu = {"张三",17,180.5F};
	printf("姓名：%s\n",stu.name);
	printf("年龄：%d\n",stu.age);
	printf("身高：%.1f\n",stu.height);

	struct Student *pstu = &stu;

	printf("==================\n");
	printf("姓名：%s\n", pstu->name);
	printf("年龄：%d\n", pstu->age);
	printf("身高：%.1f\n", pstu->height);

	int x = 10;
	int y = 15;
	int res1 = ADD1(x, y) * 2;
	int res2 = ADD2(x, y) * 2;
	printf("res1:%d\n", res1);//40
	printf("res2:%d\n", res2);//50

	return 0;
}
